package cn.edu.gsau.info.service.impl;

import cn.edu.gsau.info.dao.ReviewDao;
import cn.edu.gsau.info.vo.Review;
import cn.edu.gsau.info.service.IReviewService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @BelongsProject: gsau
 * @BelongsPackage: cn.edu.gsau.info.service.impl
 * @Author: kql
 * @CreateTime: 2022-11-28  11:06
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class ReviewServiceImpl extends ServiceImpl<ReviewDao, Review> implements IReviewService {
    @Autowired
    ReviewDao reviewDao;

    @Override
    public Review selectByModuleId(int id) {
        QueryWrapper qw = new QueryWrapper();
        qw.eq("moduleId",id);
        Review review = reviewDao.selectOne(qw);
        return review;
    }
}
